From: Rogerio Guerra Borin Date: Tue, 12 Mar 2024 20:02:58 +0000 (-0300) Subject: deploy: Ensure boot directory is open before accessing it X-Git-Tag: archive/raspbian/2024.8-1+rpi1^2~7^2~3^2~2^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=4efb44f35a099c54b9e2895cea9622a97ab6d638;p=ostree.git deploy: Ensure boot directory is open before accessing it This fixes a bug in the (early) deployment pruning function which before tried to access the boot directory without opening it first. Signed-off-by: Rogerio Guerra Borin --- diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 5d2d729b..f777b92f 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2641,6 +2641,9 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment if (self->booted_deployment == NULL) return TRUE; + if (!_ostree_sysroot_ensure_boot_fd (self, error)) + return FALSE; + { struct stat stbuf; if (!glnx_fstatat (self->boot_fd, ".", &stbuf, 0, error))